//
//  jiFenViewController.m
//  1243
//
//  Created by ym on 16/3/26.
//  Copyright © 2016年 1243. All rights reserved.
//

#import "jiFenViewController.h"
#import "jifenTableViewCell.h"
@interface jiFenViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, strong)UITableView *tableView;
@property (nonatomic, strong)NSMutableArray *dataArr;
@property (nonatomic, strong)NSMutableArray *numberArr;

@end

@implementation jiFenViewController
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
//    self.navigationController.navigationBarHidden = NO;
    self.dataArr = [[NSMutableArray alloc] init];
    [self.dataArr addObject:@"广告分红"];
    [self.dataArr addObject:@"股权积分"];
    [self.dataArr addObject:@"广告积分"];
    self.numberArr = [[NSMutableArray alloc] init];
    [self.numberArr addObject:@"1.5"];
    [self.numberArr addObject:@"200"];
    [self.numberArr addObject:@"15"];
    
    self.title = @"会员管理系统";

}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
//    self.navigationController.navigationBarHidden = YES;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [self creat];
}

- (void)creat{
    self.tableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
    self.tableView.backgroundColor = [UIColor whiteColor];

    
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    jifenTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"jifen"];
    if (cell == nil) {
        cell = [[jifenTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"jifen"] ;
    }
    
    // Configure the cell.
    //    [[cell textLabel] setText:[[[heroData objectAtIndex:indexPath.section] objectAtIndex: indexPath.row] objectForKey:@"name"]];
    //    [[cell imageView] setImage:[UIImage imageNamed:[[[heroData objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]objectForKey:@"picture"]]];
    
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
//    cell.textLabel.text = self.dataArr[indexPath.row];
    cell.name.text = self.dataArr[indexPath.row];
    cell.number.text = self.numberArr[indexPath.row];
    return cell;
    
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.dataArr.count;
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
